/*
 * Copyright 2007, 2008 Tiberiumlabs
 *
 * This file is part of Tiberiumlabs Lailaps.
 *
 * Tiberiumlabs Lailaps is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * Tiberiumlabs Lailaps is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.tiberiumlabs.lailaps;

import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.metal.MetalLookAndFeel;
import org.tiberiumlabs.lailaps.gui.laf.LailapsMetalTheme;
import org.tiberiumlabs.logging.SingleLog;

/**
 *
 * @author <a href="mailto:paranoid.tiberiumlabs@gmail.com">Paranoid</a>
 */
public class DevMain {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        SingleLog.init(SingleLog.DEBUG, System.out);

        try {
            if (System.getProperty("os.name").indexOf("Windows") >= 0) {
                UIManager.setLookAndFeel(new WindowsLookAndFeel());
            }
            else {
                MetalLookAndFeel.setCurrentTheme(new LailapsMetalTheme());
            }
        } catch (UnsupportedLookAndFeelException ignore) {
            // will use default
        }

        Mediator mediator = Mediator.getMediator();
        JFrame mainWindow = mediator.getGuiBuilder().getMainWindow();
        mainWindow.pack();
        mainWindow.setVisible(true);
    }

}
